/*
 *  Copyright 2019-2020 Zheng Jie
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package me.zhengjie.modules.biz.service;

import me.zhengjie.modules.biz.domain.HazardousChemicals;
import me.zhengjie.modules.biz.service.dto.HazardousChemicalsDto;
import me.zhengjie.modules.biz.service.dto.HazardousChemicalsQueryCriteria;
import me.zhengjie.modules.biz.service.dto.HazardousChemicalsTotalDto;
import org.springframework.data.domain.Pageable;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * @author Admin
 * @website https://eladmin.vip
 * @description 服务接口
 * @date 2023-03-03
 **/
public interface HazardousChemicalsService {

    /**
     * 查询数据分页
     *
     * @param criteria 条件
     * @param pageable 分页参数
     * @return Map<String, Object>
     */
    Map<String, Object> queryAll(HazardousChemicalsQueryCriteria criteria, Pageable pageable);

    /**
     * 查询所有数据不分页
     *
     * @param criteria 条件参数
     * @return List<HazardousChemicalsDto>
     */
    List<HazardousChemicalsDto> queryAll(HazardousChemicalsQueryCriteria criteria);

    /**
     * 根据ID查询
     *
     * @param id ID
     * @return HazardousChemicalsDto
     */
    HazardousChemicalsDto findById(Integer id);

    /**
     * 创建
     *
     * @param resources /
     * @return HazardousChemicalsDto
     */
    HazardousChemicalsDto create(HazardousChemicals resources, boolean isNew);

    /**
     * 编辑
     *
     * @param resources /
     */
    void update(HazardousChemicals resources);

    /**
     * 多选删除
     *
     * @param ids /
     */
    void deleteAll(Integer[] ids);

    /**
     * 导出数据
     *
     * @param all      待导出的数据
     * @param response /
     * @throws IOException /
     */
    void exportEquipment(List<HazardousChemicalsDto> all, HttpServletResponse response) throws IOException;

    Map<String, Object> collect(HazardousChemicalsQueryCriteria criteria, Pageable pageable);

    void printBarCode(Integer id, HttpServletResponse response);

    Map<String, Object> applyListPage(HazardousChemicalsQueryCriteria criteria, Pageable pageable);

    List<HazardousChemicalsDto> applyList(Integer type);

    void burning(Integer[] ids);

    void destroy(Integer[] ids);

    List<HazardousChemicalsTotalDto> queryAllByRequest(Integer type);

    void isPastDueH();

    Map<String, Object> expireList(HazardousChemicalsQueryCriteria criteria, Pageable pageable);

//    void destroyByIds(Integer[] ids);

    List<HazardousChemicalsDto> distanceEquipmentList();

    HazardousChemicalsDto soloEquipment(Integer id);

    List<HazardousChemicalsDto> distanceStandardSubstance();

    List<HazardousChemicalsDto> distanceChemicalReagent();

    List<Map<String, Object>> queryNamesByType(int type);

    List<HazardousChemicalsDto> refrigeratorHazarddousChemicalsList(Integer id);

    void exportChemicals(List<HazardousChemicalsDto> hazardousChemicalsDtoList, HttpServletResponse response) throws IOException;

    void exportMaterials(List<HazardousChemicalsDto> chemicalsDtoList, HttpServletResponse response) throws IOException;

    List<Map<String, Object>> aabb();

    Map<String, String> checkInventory(Integer id, Float amount);

    void updateInventory(Integer id, Float amount);

    void panKu(int userId, List<Map<String, Object>> data);

    List<HazardousChemicalsDto> getByType(Integer type);
}
